<?php


namespace app\model;


class ShopUser extends BaseModel
{
    public function level()
    {
        return $this->hasOne(ShopLevel::class, 'id', 'level_id');
    }

    public function role()
    {
        return $this->hasOne(ShopRole::class, 'id', 'role_id');
    }

    public function roleInfo()
    {
        return $this->hasOne(ShopRoleInfo::class, 'id', 'role_info_id');
    }

   public function referrer()
   {
        return $this->hasOne(ShopUser::class, 'id', 'referrer_id');
    }

}